<?php


namespace Rjyst\RjVirtualApi;

use Illuminate\Support\ServiceProvider;

class RjVirtualApiServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap services.
     */
    public function boot(): void
    {
        // 发布API控制器文件
        $this->publishes([
            __DIR__ . '/../stubs/Http/Controllers/' => app_path('Http/Controllers')
        ], 'rj-virtual-api-controllers');

        // 注册 Artisan 命令
        if ($this->app->runningInConsole()) {
            $this->commands([
                Console\Commands\InstallCommand::class,
                Console\Commands\UninstallCommand::class,
            ]);
        }
    }
}
